<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">
		<title>登入页</title>
		<!-- Bootstrap core CSS -->
		<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
		<!-- Custom styles for this template -->
		<link th:href="@{/css/signin.css}" rel="stylesheet">
	</head>
	<body class="text-center">
		<form class="form-signin" th:action="@{/loginPage}" method="post">
			<img class="mb-4" th:src="@{/img/logo.svg}" width="72" height="72">
			<h1 class="h3 mb-3 font-weight-normal" th:text="#{loginPage.tips}"></h1>
			<label class="sr-only" th:text="#{loginPage.username}"></label>
			<input type="text" class="form-control" th:placeholder="#{loginPage.username}" name="username">
			<label class="sr-only" th:text="#{loginPage.password}"></label>
			<input type="password" class="form-control" th:placeholder="#{loginPage.password}" name="password">
			<div th:text="${msg}"></div>
			<div class="checkbox mb-3">
				<div>
					<input type="text" class="form-control" name="verifyCode" required="required" placeholder="验证码">
					<img src="getVerifyCode" title="看不清，请点我" onclick="refresh(this)" onmouseover="mouseover(this)" />
				</div>
				<label>
          <input type="checkbox" name="remember-me">[[#{loginPage.remember}]]
        </label>
			</div>
			<button class="btn btn-lg btn-primary btn-block" type="submit">[[#{loginPage.btn}]]</button>
			<p class="mt-5 mb-3 text-muted">© 黄轩111600208</p>

			<a class="btn btn-sm" th:href="@{/changeLanguage/zh_CN}">中文</a>
			<a class="btn btn-sm" th:href="@{/changeLanguage/en_US}">English</a>
		</form>
	</body>
	<script>
		function refresh(obj) { obj.src = "getVerifyCode?" + Math.random(); }

		function mouseover(obj) { obj.style.cursor = "pointer"; }
	</script>
</html>